package com.zzy.面试;

import java.util.ArrayList;
import java.util.List;

public class TestCopy {

	public static void main(String[] args) {
		List<Integer> l1 = new ArrayList<Integer>();
		l1.add(1);
		
		List<Integer> l2 = l1;
		
		l1.set(0, null);
		
//		l1.clear();
		
		System.out.println(l2.get(0));
		
		test(false);
	}
	
	public static void test(boolean flag){
		
			throw new IndexOutOfBoundsException();
	}

}
